<template>
    <div class="platform-content">
        <h4 class="platform-content-title">
            <span>微信用户信息表</span>
            <div class="platform-list-op">
                <el-button
                        v-permission="'wxprogram.user.create'"
                        size="small"
                        type="primary"
                        @click="openCreate"
                >
                    新建
                </el-button>
                <el-button
                        size="mini"
                        type="success"
                        @click="changeSearch"
                >
                    收起/展开
                </el-button>
            </div>
        </h4>
        <div class="platform-content-info">
            <el-row>
                <el-form
                        ref="searchForm"
                        :inline="true"
                        :model="pageData"
                        class="platform-content-search-form-more"
                >
                    <el-row v-if="showSearch">
                                                <el-col :span="6">
                            <el-form-item label="用户昵称">
                                <el-input
                                        v-model="pageData.nick_name"
                                        placeholder="用户昵称"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="性别">
                                <el-input
                                        v-model="pageData.sex"
                                        placeholder="性别"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="手机号码">
                                <el-input
                                        v-model="pageData.phone"
                                        placeholder="手机号码"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="注册省份">
                                <el-input
                                        v-model="pageData.province"
                                        placeholder="注册省份"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="注册城市">
                                <el-input
                                        v-model="pageData.city"
                                        placeholder="注册城市"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="注册时间">
                                <el-input
                                        v-model="pageData.create_time"
                                        placeholder="注册时间"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="头像">
                                <el-input
                                        v-model="pageData.headimg_url"
                                        placeholder="头像"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="创建者">
                                <el-input
                                        v-model="pageData.create_id"
                                        placeholder="创建者"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="更新者">
                                <el-input
                                        v-model="pageData.update_id"
                                        placeholder="更新者"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="更新时间">
                                <el-input
                                        v-model="pageData.update_time"
                                        placeholder="更新时间"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="用户备注">
                                <el-input
                                        v-model="pageData.remark"
                                        placeholder="用户备注"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="逻辑删除标记（0：显示；1：隐藏）">
                                <el-input
                                        v-model="pageData.del_flag"
                                        placeholder="逻辑删除标记（0：显示；1：隐藏）"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="应用类型(1:小程序，2:公众号)">
                                <el-input
                                        v-model="pageData.app_type"
                                        placeholder="应用类型(1:小程序，2:公众号)"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="是否订阅（1：是；0：否；2：网页授权用户）">
                                <el-input
                                        v-model="pageData.subscribe"
                                        placeholder="是否订阅（1：是；0：否；2：网页授权用户）"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他">
                                <el-input
                                        v-model="pageData.subscribe_scene"
                                        placeholder="返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="关注时间">
                                <el-input
                                        v-model="pageData.subscribe_time"
                                        placeholder="关注时间"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="关注次数">
                                <el-input
                                        v-model="pageData.subscribe_num"
                                        placeholder="关注次数"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="取消关注时间">
                                <el-input
                                        v-model="pageData.cancel_subscribe_time"
                                        placeholder="取消关注时间"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="用户标识">
                                <el-input
                                        v-model="pageData.open_id"
                                        placeholder="用户标识"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="所在国家">
                                <el-input
                                        v-model="pageData.country"
                                        placeholder="所在国家"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="用户语言">
                                <el-input
                                        v-model="pageData.language"
                                        placeholder="用户语言"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="union_id">
                                <el-input
                                        v-model="pageData.union_id"
                                        placeholder="union_id"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="用户组">
                                <el-input
                                        v-model="pageData.group_id"
                                        placeholder="用户组"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="标签列表">
                                <el-input
                                        v-model="pageData.tagid_list"
                                        placeholder="标签列表"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="二维码扫码场景">
                                <el-input
                                        v-model="pageData.qr_scene_str"
                                        placeholder="二维码扫码场景"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="纬度">
                                <el-input
                                        v-model="pageData.latitude"
                                        placeholder="纬度"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="经度">
                                <el-input
                                        v-model="pageData.longitude"
                                        placeholder="经度"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="地理位置精度">
                                <el-input
                                        v-model="pageData.precision"
                                        placeholder="地理位置精度"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="会话密钥">
                                <el-input
                                        v-model="pageData.session_key"
                                        placeholder="会话密钥"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="密码">
                                <el-input
                                        v-model="pageData.password"
                                        placeholder="密码"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="积分">
                                <el-input
                                        v-model="pageData.points"
                                        placeholder="积分"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6">
                            <el-form-item label="是否接收时间的推送">
                                <el-input
                                        v-model="pageData.receive_event"
                                        placeholder="是否接收时间的推送"
                                        maxlength="255"
                                        auto-complete="off"
                                        type="text"
                                />
                            </el-form-item>
                        </el-col>
                                                <el-col :span="6" style="float:right;">
                            <div class="platform-content-search-op-more">
                                <el-button
                                        size="small"
                                        @click="doReSearch"
                                >
                                    重 置
                                </el-button>
                                <el-button
                                        size="small"
                                        type="primary"
                                        @click="doSearch"
                                >
                                    查 询
                                </el-button>
                            </div>
                        </el-col>
                    </el-row>
                </el-form>
            </el-row>
            <div class="platform-content-list">
                <div class="platform-content-list-table">
                    <el-table
                            v-loading="listLoading"
                            :data="listData"
                            stripe
                            @sort-change="doPageSort"
                    >
                                                    <el-table-column
                                    prop="nick_name"
                                    label="用户昵称"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="sex"
                                    label="性别"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="phone"
                                    label="手机号码"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="province"
                                    label="注册省份"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="city"
                                    label="注册城市"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="create_time"
                                    label="注册时间"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="headimg_url"
                                    label="头像"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="create_id"
                                    label="创建者"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="update_id"
                                    label="更新者"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="update_time"
                                    label="更新时间"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="remark"
                                    label="用户备注"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="del_flag"
                                    label="逻辑删除标记（0：显示；1：隐藏）"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="app_type"
                                    label="应用类型(1:小程序，2:公众号)"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="subscribe"
                                    label="是否订阅（1：是；0：否；2：网页授权用户）"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="subscribe_scene"
                                    label="返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="subscribe_time"
                                    label="关注时间"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="subscribe_num"
                                    label="关注次数"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="cancel_subscribe_time"
                                    label="取消关注时间"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="open_id"
                                    label="用户标识"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="country"
                                    label="所在国家"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="language"
                                    label="用户语言"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="union_id"
                                    label="union_id"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="group_id"
                                    label="用户组"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="tagid_list"
                                    label="标签列表"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="qr_scene_str"
                                    label="二维码扫码场景"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="latitude"
                                    label="纬度"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="longitude"
                                    label="经度"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="precision"
                                    label="地理位置精度"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="session_key"
                                    label="会话密钥"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="password"
                                    label="密码"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="points"
                                    label="积分"
                                    sortable
                            />
                                                    <el-table-column
                                    prop="receive_event"
                                    label="是否接收时间的推送"
                                    sortable
                            />
                                                <el-table-column
                                fixed="right"
                                header-align="center"
                                align="center"
                                label="操作"
                                width="180"
                        >
                            <template slot-scope="scope">
                                <el-button
                                        v-permission="'wxprogram.user'"
                                        type="text"
                                        size="small"
                                        @click.native.prevent="openShow(scope.row)"
                                >
                                    详情
                                </el-button>
                                <el-button
                                        v-permission="'wxprogram.user.update'"
                                        type="text"
                                        size="small"
                                        @click.native.prevent="openUpdate(scope.row)"
                                >
                                    修改
                                </el-button>
                                <el-button
                                        v-permission="'wxprogram.user.delete'"
                                        type="text"
                                        size="small"
                                        class="button-delete-color"
                                        @click.native.prevent="openDelete(scope.row)"
                                >
                                    删除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
                <div class="platform-content-list-pagination">
                    <el-pagination
                            :current-page="pageData.pageNo"
                            :page-size="pageData.pageSize"
                            :total="pageData.totalCount"
                            class="platform-pagenation"
                            background
                            :page-sizes="[10, 20, 30, 50]"
                            layout="sizes, prev, pager, next"
                            @current-change="doChangePage"
                            @size-change="doSizeChange"
                    />
                </div>
            </div>
        </div>

        <el-dialog
                title="新建"
                :visible.sync="createDialogVisible"
                :close-on-click-modal="false"
                width="50%"
        >
            <el-form
                    ref="createForm"
                    :model="formData"
                    :rules="formRules"
                    size="small"
                    label-width="120px"
            >
                                    <el-form-item
                            prop="nick_name"
                            label="用户昵称"
                    >
                        <el-input
                                v-model="formData.nick_name"
                                maxlength="100"
                                placeholder="用户昵称"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="sex"
                            label="性别"
                    >
                        <el-input
                                v-model="formData.sex"
                                maxlength="100"
                                placeholder="性别"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="phone"
                            label="手机号码"
                    >
                        <el-input
                                v-model="formData.phone"
                                maxlength="100"
                                placeholder="手机号码"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="province"
                            label="注册省份"
                    >
                        <el-input
                                v-model="formData.province"
                                maxlength="100"
                                placeholder="注册省份"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="city"
                            label="注册城市"
                    >
                        <el-input
                                v-model="formData.city"
                                maxlength="100"
                                placeholder="注册城市"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="create_time"
                            label="注册时间"
                    >
                        <el-input
                                v-model="formData.create_time"
                                maxlength="100"
                                placeholder="注册时间"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="headimg_url"
                            label="头像"
                    >
                        <el-input
                                v-model="formData.headimg_url"
                                maxlength="100"
                                placeholder="头像"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="create_id"
                            label="创建者"
                    >
                        <el-input
                                v-model="formData.create_id"
                                maxlength="100"
                                placeholder="创建者"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="update_id"
                            label="更新者"
                    >
                        <el-input
                                v-model="formData.update_id"
                                maxlength="100"
                                placeholder="更新者"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="update_time"
                            label="更新时间"
                    >
                        <el-input
                                v-model="formData.update_time"
                                maxlength="100"
                                placeholder="更新时间"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="remark"
                            label="用户备注"
                    >
                        <el-input
                                v-model="formData.remark"
                                maxlength="100"
                                placeholder="用户备注"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="del_flag"
                            label="逻辑删除标记（0：显示；1：隐藏）"
                    >
                        <el-input
                                v-model="formData.del_flag"
                                maxlength="100"
                                placeholder="逻辑删除标记（0：显示；1：隐藏）"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="app_type"
                            label="应用类型(1:小程序，2:公众号)"
                    >
                        <el-input
                                v-model="formData.app_type"
                                maxlength="100"
                                placeholder="应用类型(1:小程序，2:公众号)"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="subscribe"
                            label="是否订阅（1：是；0：否；2：网页授权用户）"
                    >
                        <el-input
                                v-model="formData.subscribe"
                                maxlength="100"
                                placeholder="是否订阅（1：是；0：否；2：网页授权用户）"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="subscribe_scene"
                            label="返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他"
                    >
                        <el-input
                                v-model="formData.subscribe_scene"
                                maxlength="100"
                                placeholder="返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="subscribe_time"
                            label="关注时间"
                    >
                        <el-input
                                v-model="formData.subscribe_time"
                                maxlength="100"
                                placeholder="关注时间"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="subscribe_num"
                            label="关注次数"
                    >
                        <el-input
                                v-model="formData.subscribe_num"
                                maxlength="100"
                                placeholder="关注次数"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="cancel_subscribe_time"
                            label="取消关注时间"
                    >
                        <el-input
                                v-model="formData.cancel_subscribe_time"
                                maxlength="100"
                                placeholder="取消关注时间"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="open_id"
                            label="用户标识"
                    >
                        <el-input
                                v-model="formData.open_id"
                                maxlength="100"
                                placeholder="用户标识"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="country"
                            label="所在国家"
                    >
                        <el-input
                                v-model="formData.country"
                                maxlength="100"
                                placeholder="所在国家"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="language"
                            label="用户语言"
                    >
                        <el-input
                                v-model="formData.language"
                                maxlength="100"
                                placeholder="用户语言"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="union_id"
                            label="union_id"
                    >
                        <el-input
                                v-model="formData.union_id"
                                maxlength="100"
                                placeholder="union_id"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="group_id"
                            label="用户组"
                    >
                        <el-input
                                v-model="formData.group_id"
                                maxlength="100"
                                placeholder="用户组"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="tagid_list"
                            label="标签列表"
                    >
                        <el-input
                                v-model="formData.tagid_list"
                                maxlength="100"
                                placeholder="标签列表"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="qr_scene_str"
                            label="二维码扫码场景"
                    >
                        <el-input
                                v-model="formData.qr_scene_str"
                                maxlength="100"
                                placeholder="二维码扫码场景"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="latitude"
                            label="纬度"
                    >
                        <el-input
                                v-model="formData.latitude"
                                maxlength="100"
                                placeholder="纬度"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="longitude"
                            label="经度"
                    >
                        <el-input
                                v-model="formData.longitude"
                                maxlength="100"
                                placeholder="经度"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="precision"
                            label="地理位置精度"
                    >
                        <el-input
                                v-model="formData.precision"
                                maxlength="100"
                                placeholder="地理位置精度"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="session_key"
                            label="会话密钥"
                    >
                        <el-input
                                v-model="formData.session_key"
                                maxlength="100"
                                placeholder="会话密钥"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="password"
                            label="密码"
                    >
                        <el-input
                                v-model="formData.password"
                                maxlength="100"
                                placeholder="密码"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="points"
                            label="积分"
                    >
                        <el-input
                                v-model="formData.points"
                                maxlength="100"
                                placeholder="积分"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="receive_event"
                            label="是否接收时间的推送"
                    >
                        <el-input
                                v-model="formData.receive_event"
                                maxlength="100"
                                placeholder="是否接收时间的推送"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                            </el-form>
            <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="createDialogVisible = false">取 消</el-button>
        <el-button
                size="small"
                type="primary"
                :loading="btnLoading"
                @click="doCreate"
        >确 定</el-button>
      </span>
        </el-dialog>
        <el-dialog
                title="查看详情"
                :visible.sync="showDialogVisible"
                :close-on-click-modal="false"
                width="50%"
        >
            <el-descriptions class="margin-top" colon="false" direction="horizontal" :column="1" :size="size" border="false">
                                    <el-descriptions-item>
                        <template slot="label">
                            用户昵称
                        </template>
                        {{formData.nick_name}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            性别
                        </template>
                        {{formData.sex}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            手机号码
                        </template>
                        {{formData.phone}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            注册省份
                        </template>
                        {{formData.province}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            注册城市
                        </template>
                        {{formData.city}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            注册时间
                        </template>
                        {{formData.create_time}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            头像
                        </template>
                        {{formData.headimg_url}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            创建者
                        </template>
                        {{formData.create_id}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            更新者
                        </template>
                        {{formData.update_id}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            更新时间
                        </template>
                        {{formData.update_time}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            用户备注
                        </template>
                        {{formData.remark}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            逻辑删除标记（0：显示；1：隐藏）
                        </template>
                        {{formData.del_flag}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            应用类型(1:小程序，2:公众号)
                        </template>
                        {{formData.app_type}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            是否订阅（1：是；0：否；2：网页授权用户）
                        </template>
                        {{formData.subscribe}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他
                        </template>
                        {{formData.subscribe_scene}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            关注时间
                        </template>
                        {{formData.subscribe_time}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            关注次数
                        </template>
                        {{formData.subscribe_num}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            取消关注时间
                        </template>
                        {{formData.cancel_subscribe_time}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            用户标识
                        </template>
                        {{formData.open_id}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            所在国家
                        </template>
                        {{formData.country}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            用户语言
                        </template>
                        {{formData.language}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            union_id
                        </template>
                        {{formData.union_id}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            用户组
                        </template>
                        {{formData.group_id}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            标签列表
                        </template>
                        {{formData.tagid_list}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            二维码扫码场景
                        </template>
                        {{formData.qr_scene_str}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            纬度
                        </template>
                        {{formData.latitude}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            经度
                        </template>
                        {{formData.longitude}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            地理位置精度
                        </template>
                        {{formData.precision}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            会话密钥
                        </template>
                        {{formData.session_key}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            密码
                        </template>
                        {{formData.password}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            积分
                        </template>
                        {{formData.points}}
                    </el-descriptions-item>
                                    <el-descriptions-item>
                        <template slot="label">
                            是否接收时间的推送
                        </template>
                        {{formData.receive_event}}
                    </el-descriptions-item>
                            </el-descriptions>
            <span slot="footer" class="dialog-footer">
        <el-button size="small" type="primary" @click="showDialogVisible = false">关 闭</el-button>
      </span>
        </el-dialog>
        <el-dialog
                title="修改分类"
                :visible.sync="updateDialogVisible"
                :close-on-click-modal="false"
                width="50%"
        >
            <el-form
                    ref="updateForm"
                    :model="formData"
                    :rules="formRules"
                    size="small"
                    label-width="120px"
            >
                                    <el-form-item
                            prop="nick_name"
                            label="用户昵称"
                    >
                        <el-input
                                v-model="formData.nick_name"
                                maxlength="100"
                                placeholder="用户昵称"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="sex"
                            label="性别"
                    >
                        <el-input
                                v-model="formData.sex"
                                maxlength="100"
                                placeholder="性别"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="phone"
                            label="手机号码"
                    >
                        <el-input
                                v-model="formData.phone"
                                maxlength="100"
                                placeholder="手机号码"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="province"
                            label="注册省份"
                    >
                        <el-input
                                v-model="formData.province"
                                maxlength="100"
                                placeholder="注册省份"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="city"
                            label="注册城市"
                    >
                        <el-input
                                v-model="formData.city"
                                maxlength="100"
                                placeholder="注册城市"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="create_time"
                            label="注册时间"
                    >
                        <el-input
                                v-model="formData.create_time"
                                maxlength="100"
                                placeholder="注册时间"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="headimg_url"
                            label="头像"
                    >
                        <el-input
                                v-model="formData.headimg_url"
                                maxlength="100"
                                placeholder="头像"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="create_id"
                            label="创建者"
                    >
                        <el-input
                                v-model="formData.create_id"
                                maxlength="100"
                                placeholder="创建者"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="update_id"
                            label="更新者"
                    >
                        <el-input
                                v-model="formData.update_id"
                                maxlength="100"
                                placeholder="更新者"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="update_time"
                            label="更新时间"
                    >
                        <el-input
                                v-model="formData.update_time"
                                maxlength="100"
                                placeholder="更新时间"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="remark"
                            label="用户备注"
                    >
                        <el-input
                                v-model="formData.remark"
                                maxlength="100"
                                placeholder="用户备注"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="del_flag"
                            label="逻辑删除标记（0：显示；1：隐藏）"
                    >
                        <el-input
                                v-model="formData.del_flag"
                                maxlength="100"
                                placeholder="逻辑删除标记（0：显示；1：隐藏）"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="app_type"
                            label="应用类型(1:小程序，2:公众号)"
                    >
                        <el-input
                                v-model="formData.app_type"
                                maxlength="100"
                                placeholder="应用类型(1:小程序，2:公众号)"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="subscribe"
                            label="是否订阅（1：是；0：否；2：网页授权用户）"
                    >
                        <el-input
                                v-model="formData.subscribe"
                                maxlength="100"
                                placeholder="是否订阅（1：是；0：否；2：网页授权用户）"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="subscribe_scene"
                            label="返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他"
                    >
                        <el-input
                                v-model="formData.subscribe_scene"
                                maxlength="100"
                                placeholder="返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="subscribe_time"
                            label="关注时间"
                    >
                        <el-input
                                v-model="formData.subscribe_time"
                                maxlength="100"
                                placeholder="关注时间"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="subscribe_num"
                            label="关注次数"
                    >
                        <el-input
                                v-model="formData.subscribe_num"
                                maxlength="100"
                                placeholder="关注次数"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="cancel_subscribe_time"
                            label="取消关注时间"
                    >
                        <el-input
                                v-model="formData.cancel_subscribe_time"
                                maxlength="100"
                                placeholder="取消关注时间"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="open_id"
                            label="用户标识"
                    >
                        <el-input
                                v-model="formData.open_id"
                                maxlength="100"
                                placeholder="用户标识"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="country"
                            label="所在国家"
                    >
                        <el-input
                                v-model="formData.country"
                                maxlength="100"
                                placeholder="所在国家"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="language"
                            label="用户语言"
                    >
                        <el-input
                                v-model="formData.language"
                                maxlength="100"
                                placeholder="用户语言"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="union_id"
                            label="union_id"
                    >
                        <el-input
                                v-model="formData.union_id"
                                maxlength="100"
                                placeholder="union_id"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="group_id"
                            label="用户组"
                    >
                        <el-input
                                v-model="formData.group_id"
                                maxlength="100"
                                placeholder="用户组"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="tagid_list"
                            label="标签列表"
                    >
                        <el-input
                                v-model="formData.tagid_list"
                                maxlength="100"
                                placeholder="标签列表"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="qr_scene_str"
                            label="二维码扫码场景"
                    >
                        <el-input
                                v-model="formData.qr_scene_str"
                                maxlength="100"
                                placeholder="二维码扫码场景"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="latitude"
                            label="纬度"
                    >
                        <el-input
                                v-model="formData.latitude"
                                maxlength="100"
                                placeholder="纬度"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="longitude"
                            label="经度"
                    >
                        <el-input
                                v-model="formData.longitude"
                                maxlength="100"
                                placeholder="经度"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="precision"
                            label="地理位置精度"
                    >
                        <el-input
                                v-model="formData.precision"
                                maxlength="100"
                                placeholder="地理位置精度"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="session_key"
                            label="会话密钥"
                    >
                        <el-input
                                v-model="formData.session_key"
                                maxlength="100"
                                placeholder="会话密钥"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="password"
                            label="密码"
                    >
                        <el-input
                                v-model="formData.password"
                                maxlength="100"
                                placeholder="密码"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="points"
                            label="积分"
                    >
                        <el-input
                                v-model="formData.points"
                                maxlength="100"
                                placeholder="积分"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                                    <el-form-item
                            prop="receive_event"
                            label="是否接收时间的推送"
                    >
                        <el-input
                                v-model="formData.receive_event"
                                maxlength="100"
                                placeholder="是否接收时间的推送"
                                auto-complete="off"
                                type="text"
                        />
                    </el-form-item>
                            </el-form>
            <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="updateDialogVisible = false">取 消</el-button>
        <el-button
                size="small"
                type="primary"
                :loading="btnLoading"
                @click="doUpdate"
        >确 定</el-button>
      </span>
        </el-dialog>
    </div>
</template>

<script>
    import {
        API_WXPROGRAM_USER_LIST,
        API_WXPROGRAM_USER_CREATE,
        API_WXPROGRAM_USER_DELETE,
        API_WXPROGRAM_USER_UPDATE,
        API_WXPROGRAM_USER_GET
    } from '@/constant/api/wxprogram/user'
    export default {
        middleware: ['authenticated', 'check_permissions'],
        data() {
            return {
                loading: true,
                btnLoading: false,
                listLoading: false,
                createDialogVisible: false,
                updateDialogVisible: false,
                showDialogVisible: false,
                showSearch: false,
                listData: [],
                pageData: {
                    pageNo: 1,
                    pageSize: 10,
                    totalCount: 0,
                    pageOrderName: 'createdAt',
                    pageOrderBy: 'descending'
                },
                formData: {
                },
                editData: {
                }
            }
        },
        computed: {
            // 表单验证,写在computed里切换多语言才会更新
            formRules() {
                const formRules = {
                                                nick_name: [
                            {
                                required: false,
                                message: '用户昵称',
                                trigger: 'blur'
                            }
                        ],
                                                sex: [
                            {
                                required: false,
                                message: '性别',
                                trigger: 'blur'
                            }
                        ],
                                                phone: [
                            {
                                required: false,
                                message: '手机号码',
                                trigger: 'blur'
                            }
                        ],
                                                province: [
                            {
                                required: false,
                                message: '注册省份',
                                trigger: 'blur'
                            }
                        ],
                                                city: [
                            {
                                required: false,
                                message: '注册城市',
                                trigger: 'blur'
                            }
                        ],
                                                create_time: [
                            {
                                required: false,
                                message: '注册时间',
                                trigger: 'blur'
                            }
                        ],
                                                headimg_url: [
                            {
                                required: false,
                                message: '头像',
                                trigger: 'blur'
                            }
                        ],
                                                create_id: [
                            {
                                required: false,
                                message: '创建者',
                                trigger: 'blur'
                            }
                        ],
                                                update_id: [
                            {
                                required: false,
                                message: '更新者',
                                trigger: 'blur'
                            }
                        ],
                                                update_time: [
                            {
                                required: false,
                                message: '更新时间',
                                trigger: 'blur'
                            }
                        ],
                                                remark: [
                            {
                                required: false,
                                message: '用户备注',
                                trigger: 'blur'
                            }
                        ],
                                                del_flag: [
                            {
                                required: false,
                                message: '逻辑删除标记（0：显示；1：隐藏）',
                                trigger: 'blur'
                            }
                        ],
                                                app_type: [
                            {
                                required: false,
                                message: '应用类型(1:小程序，2:公众号)',
                                trigger: 'blur'
                            }
                        ],
                                                subscribe: [
                            {
                                required: false,
                                message: '是否订阅（1：是；0：否；2：网页授权用户）',
                                trigger: 'blur'
                            }
                        ],
                                                subscribe_scene: [
                            {
                                required: false,
                                message: '返回用户关注的渠道来源，ADD_SCENE_SEARCH 公众号搜索，ADD_SCENE_ACCOUNT_MIGRATION 公众号迁移，ADD_SCENE_PROFILE_CARD 名片分享，ADD_SCENE_QR_CODE 扫描二维码，ADD_SCENEPROFILE LINK 图文页内名称点击，ADD_SCENE_PROFILE_ITEM 图文页右上角菜单，ADD_SCENE_PAID 支付后关注，ADD_SCENE_OTHERS 其他',
                                trigger: 'blur'
                            }
                        ],
                                                subscribe_time: [
                            {
                                required: false,
                                message: '关注时间',
                                trigger: 'blur'
                            }
                        ],
                                                subscribe_num: [
                            {
                                required: false,
                                message: '关注次数',
                                trigger: 'blur'
                            }
                        ],
                                                cancel_subscribe_time: [
                            {
                                required: false,
                                message: '取消关注时间',
                                trigger: 'blur'
                            }
                        ],
                                                open_id: [
                            {
                                required: false,
                                message: '用户标识',
                                trigger: 'blur'
                            }
                        ],
                                                country: [
                            {
                                required: false,
                                message: '所在国家',
                                trigger: 'blur'
                            }
                        ],
                                                language: [
                            {
                                required: false,
                                message: '用户语言',
                                trigger: 'blur'
                            }
                        ],
                                                union_id: [
                            {
                                required: false,
                                message: 'union_id',
                                trigger: 'blur'
                            }
                        ],
                                                group_id: [
                            {
                                required: false,
                                message: '用户组',
                                trigger: 'blur'
                            }
                        ],
                                                tagid_list: [
                            {
                                required: false,
                                message: '标签列表',
                                trigger: 'blur'
                            }
                        ],
                                                qr_scene_str: [
                            {
                                required: false,
                                message: '二维码扫码场景',
                                trigger: 'blur'
                            }
                        ],
                                                latitude: [
                            {
                                required: false,
                                message: '纬度',
                                trigger: 'blur'
                            }
                        ],
                                                longitude: [
                            {
                                required: false,
                                message: '经度',
                                trigger: 'blur'
                            }
                        ],
                                                precision: [
                            {
                                required: false,
                                message: '地理位置精度',
                                trigger: 'blur'
                            }
                        ],
                                                session_key: [
                            {
                                required: false,
                                message: '会话密钥',
                                trigger: 'blur'
                            }
                        ],
                                                password: [
                            {
                                required: false,
                                message: '密码',
                                trigger: 'blur'
                            }
                        ],
                                                points: [
                            {
                                required: false,
                                message: '积分',
                                trigger: 'blur'
                            }
                        ],
                                                receive_event: [
                            {
                                required: false,
                                message: '是否接收时间的推送',
                                trigger: 'blur'
                            }
                        ],
                                    }
                return formRules
            }
        },


        created() {
            if (process.browser) {
                this.listPage()
            }
        },
        methods: {
            // 打开字新增窗口
            openCreate() {
                this.formData = {}
                this.createDialogVisible = true
            },
            // 提交表单
            doCreate() {
                this.$refs['createForm']
                        .validate( (valid) => {
                if (valid) {
                this.btnLoading = true
                this.$axios
                .$post(API_WXPROGRAM_USER_CREATE, this.formData)
                .then((d) => {
                this.btnLoading = false
                if (d.code === 0) {
                this.$message({
                message: d.msg,
                type: 'success'
                })
                this.createDialogVisible = false
                this.listPage()
                }
                })
                }
                })
            },
            // 打开修改窗口
            openUpdate(row) {
                this.editData.id = row.id
                this.$axios.$post(API_WXPROGRAM_USER_GET, this.editData).then((d) => {
                    if (d.code === 0) {
                        this.formData = d.data
                        this.updateDialogVisible = true
                    }
                })
            },
            // 打开详情窗口
            openShow(row) {
                this.editData.id = row.id
                this.$axios.$post(API_WXPROGRAM_USER_GET, this.editData).then((d) => {
                    if (d.code === 0) {
                        this.formData = d.data
                        this.showDialogVisible = true
                    }
                })
            },
            // 提交表单
            doUpdate() {
                this.$refs['updateForm']
                        .validate((valid) => {
                if (valid) {
                this.btnLoading = true
                this.$axios
                .$post(API_WXPROGRAM_USER_UPDATE, this.formData)
                .then((d) => {
                this.btnLoading = false
                if (d.code === 0) {
                this.$message({
                message: d.msg,
                type: 'success'
                })
                this.updateDialogVisible = false
                this.listPage()
                }
                })
                }
                })
            },
            // 执行删除
            openDelete(row) {
                this.editData.id = row.id
                this.$confirm(
                        '确定删除该条数据 ？',
                        '操作提示',
                        {
                            confirmButtonText: '确 定',
                            cancelButtonText: '取 消',
                            type: 'warning'
                        }
                ).then(() => {
                    this.btnLoading = true
                    this.$axios
                            .$post(API_WXPROGRAM_USER_DELETE, this.editData)
                            .then((res) => {
                                this.btnLoading = false
                                if (res.code === 0) {
                                    this.$message({
                                        message: res.msg,
                                        type: 'success'
                                    })
                                    this.listPage()
                                }
                            })
                }).catch(() => {})
            },
            // 页码变动事件
            doChangePage(val) {
                this.pageData.pageNo = val
                this.listPage()
            },
            // 页大小变动事件
            doSizeChange(val) {
                this.pageData.pageSize = val
                this.listPage()
            },
            // 页排序事件
            doPageSort(column) {
                this.pageData.pageOrderName = column.prop
                this.pageData.pageOrderBy = column.order
                this.listPage()
            },
            // 获取分页查询数据
            listPage() {
                this.listLoading = true
                this.$axios.$post(API_WXPROGRAM_USER_LIST, this.pageData).then((res) => {
                    this.listLoading = false
                    if (res.code === 0) {
                        this.listData = res.data.list
                        this.pageData.totalCount = res.data.totalCount
                    }
                })
            },
            // 条件查询展示第一页内容
            doSearch() {
                this.pageData.pageNo = 1
                this.listPage()
            },
            doReSearch() {
                this.pageData = {
                    pageNo: 1,
                    pageSize: 10,
                    totalCount: 0,
                    pageOrderName: 'createdAt',
                    pageOrderBy: 'descending'
                }
                this.$refs['searchForm'].resetFields()
            },
            changeSearch() {
                this.showSearch = !this.showSearch
            }
        }
    }

</script>
